home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d17 / lpr_lpq3.arc / LPR.DOC < prev    next >
Text File  |  1989-10-14  |  4KB  |  77 lines

  1.  
  2. NAME 
  3.      lpr - insert files or standard input into queue for background printing
  4.  
  5. SYNOPSIS 
  6.      command | lpr
  7.      lpr [-v] [-h] [file  [-]...] [ < file ]
  8.  
  9. DESCRIPTION 
  10.          LPR interprets the command line arguments as files to be passed to
  11.      the print queue maintained by the DOS PRINT background printing
  12.      utility.  Normal DOS wildcards may be specified, and "/" may be used as
  13.      a directory separator in addition to "\".  The argument "-" is taken to
  14.      be standard input (if redirected or piped) and is processed as a file
  15.      argument at the appropriate point. If no file arguments are specified,
  16.      stdin is assumed.  Standard input is handled by copying (text mode,
  17.      stops at ^Z) to a temporary file with a name mask LPR???.$$$ created in
  18.      a spool directory. This spool file is then passed to the print queue.
  19.      This allows a print process to be the last stage in a pipeline, and
  20.      still use the background printing services.  The location of the spool
  21.      files may be specified by the environment variable SPOOLDIR.  The
  22.      default is C:\SPOOL.  If an alternate drive is specified, the root
  23.      directory must be explicitly given, e.g. for a ramdrive E: set
  24.      spooldir=E:\
  25.  
  26.         When LPR processes stdin, it checks the contents of the spool
  27.      directory for files matching the mask "LPR???.$$$", and also the
  28.      print queue. Any old spool files not currently in the spool queue are
  29.      automatically deleted.  A trailing formfeed in the input file is NOT
  30.      copied over, since PRINT will add a formfeed after each file.  Apart
  31.      from this, LPR does not examine the input file.
  32.  
  33.         Lpr checks for the existance of the print spooler in memory before
  34.      attempting to pass files to it. Lpr will not print empty
  35.      files, or read input directly from the terminal.
  36.  
  37.          Lpr communicates directly with PRINT via the DOS TSR multiplex
  38.      interrupt 2F.  This is documented for DOS 3.x and above. Calls to 
  39.      lpr may be freely mixed with calls to PRINT.
  40.  
  41. OPTIONS
  42.     -v  verbose mode - lpr is more chatty about files added to the queue.
  43.          Errors such as invalid file name, print queue full or spool
  44.          directory full, are always displayed.
  45.     -h  help - displays the copyright and usage messages and quits.
  46.     -p  priority - place job(s) at the head of the print queue.
  47.  
  48. RETURN CODE
  49.      0 - no errors
  50.      1 - any errors in argument list
  51.      2 - PRINT.COM not loaded, no further processing possible
  52.  
  53. FILES
  54.      $SPOOLDIR/lpr???.$$$  - spool files
  55.  
  56.      $SPOOLDIR - environment variable indicating where to place the
  57.      spool files.  The default is C:\SPOOL.
  58.  
  59. SEE ALSO
  60.      lpq, MS-DOS manual entry for PRINT. Note in particular that the size
  61.      of the print queue may be specified at load time with /Q:nn where nn
  62.      may be in range 4-32 (default is 10).
  63.  
  64. BUGS
  65.      The files are truncated at the first Control-Z (i.e. DOS ASCII mode),
  66.      since PRINT will not handle characters beyond ^Z.  As far as I know the
  67.      only way to get such a file to the printer is to open PRN directly in
  68.      binary mode, or with COPY /B file PRN
  69.  
  70. REVISONS
  71.      V 1.1 - fixed bug with specifying files in the root directory, or in
  72.      the current (unspecified) directory of an alternate drive.  Also
  73.      allowed for "/" in pathnames, and for "." and ".." in filespecs.
  74.  
  75. AUTHOR
  76.      Richard Brittain (richard@calvin.spp.cornell.edu)
  77.